package javase2.day01;

import java.util.Date;

public class Demo1 {
	public static void main(String args[]){
		long now = System.currentTimeMillis();
		long year= now/1000/60/60/24/365+1970;
		
		System.out.println(year);
		long nextYear = now + (1000l*60*60*24*365);
		long max = 0x7fffffffffffffffl;
		year = max/1000/60/60/24/366+1970;
		System.out.println(year);
		System.out.println(nextYear);
		
		Date date = new Date(now);
		int y = date.getYear()+1900;
		int m = date.getMonth()+1;
		int d = date.getDate();
		System.out.println(y+","+m+","+d);
		
	}
}
